package com.mitrais.training.yoga;

import java.util.Map;
import java.util.HashMap;

public class HashMapExercise {
	private Map<Integer, Employee> map;
	private Employee employee;

	public HashMapExercise() {
		map = new HashMap<Integer, Employee>();
		employee = null;
	}

	/*
	 * @param key to add the key identifier of each value (Employee).
	 * 
	 * @param value to add the value which is Employee object to hash map
	 * Description : This method is intended to add Employee Object as well as
	 * Key to the HashMap
	 */
	public void addEmployee(int key, Employee value) {
		map.put(key, value);
		return;
	}

	/*
	 * @return the employee
	 * 
	 * @param key to give the identifier of each value (Employee). Description :
	 * This method is intended to get specific Employee Object based on Key from
	 * the HashMap
	 */
	public Employee getEmployee(int key) {
		employee = map.get(key);
		return employee;
	}
	/*
	 * @return map
	 * this method is intended to return the map object
	 */
	public Map<Integer, Employee> getMap(){
		return map;
	}
}
